package com.itlaobing.util;

import com.itlaobing.model.Account;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @Classname AccountRowMapper
 * @Description TODO()
 * @Date 2020/9/15 14:27
 * @Author by Administrator
 * @Version v1.0
 */
public class AccountRowMapper implements RowMapper<Account> {
    @Override
    public Account mapRow(ResultSet rs, int rowNum) throws SQLException {
        return new Account(rs.getInt("id")
                ,rs.getString("name")
                , rs.getFloat("money"));
    }
}
